#!/bin/bash
#建立依赖包环境
yum groupinstall -y ‘Development Tools
yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel

#下载-安装-编译-升级pip包，安装一下bs4
wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tar.xz
tar Jxvf Python-3.9.0.tar.xz
cd Python-3.9.0
yum -y install gcc
./configure -prefix=/usr/local/python3
make && make install
ln -s /usr/local/python3/bin/python3.9 /usr/local/bin/python3
ln -s /usr/local/python3/bin/pip3.9 /usr/local/bin/pip
python3 -m pip install --upgrade pip
python3 -m pip install bs4